include makefile.rules



all: comp stat dyn

comp:
	make -C src
stat:
	make -C lib
dyn:
	make -C lib
clean:
	rm -f `find . -name "*~"`
	rm -f `find . -name "#*"`
	rm -f `find . -name "*.o"`


distclean: clean
	rm -f `find . -name "*.so"`
	rm -f `find . -name "*.a"`
	rm -f `find . -name "*.tst"`
	rm -rf $(TRASH)
	rm -f `find . -name $(BIN)`

dist: distclean
	cd .. && tar -cvjf $(TARBALL) $(FILENAME) --exclude ".git" && mv $(TARBALL) $(FILENAME)

check:
	@cd check && ./check.pl

doc:
	echo "PROJECT_NAME=" $(PROJ_NAME) > Doxyfile
	echo "INPUT=" $(SRC_DIR) >> Doxyfile
	echo "OUTPUT_DIRECTORY=" $(DOC_DIR) >> Doxyfile
	doxygen
	cd doc/latex && make && evince refman.pdf &


distcheck: dist
	tar -xf $(TARBALL)
	cd $(FILENAME) && ./configure && make && make check

.PHONY : check stat dyn
